package com.shyroke.daydayzhuanweb.controller;


import com.shyroke.daydayzhuanapi.dto.AdminSearchLogListDto;
import com.shyroke.daydayzhuansvc.service.impl.SearchLogService;
import com.shyroke.daydayzhuansvc.util.Page;
import com.shyroke.daydayzhuansvc.util.TabelData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "admin/log")
public class AdminLogController extends  BaseController{

    @Autowired
    private SearchLogService service;

    @GetMapping(value = "listView")
    public ModelAndView siteMap (ModelAndView model){
        model.setViewName("admin/log/list");
        return  model;
    }

    @GetMapping("list")
    @ResponseBody
    public TabelData<AdminSearchLogListDto> list(Page page){
        return service.list(page);
    }

}
